<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>Document</title>
    <style>
        canvas{
            border: 1px solid black;
            display: block;
            margin: 0 auto;
        }
    </style>
</head>
<canvas id="myCanvas" width="500px" height="500px">
    您的浏览器不支持canvas，请更换浏览器
</canvas>
<script>
    var myCanvas = document.getElementById('myCanvas');
    var paint = myCanvas.getContext('2d');
  // paint.beginPath();
    paint.arc(100,100,100,0,360/180*Math.PI,false);
   
    paint.strokeStyle = 'red';
    paint.stroke();
    paint.fillStyle = 'red';
    paint.fill();
   paint.closePath();
    paint.beginPath();
    paint.arc(400,200,100,0,180/180*Math.PI,false);
    paint.strokeStyle = 'green';
    paint.stroke();
    paint.closePath();


</script>

<body>

</body>

</html>